﻿using M_Quality.API.Application.Command.ReinspectionCommand;
using M_Quality.Domain;
using M_Quality.Repository.Interface;
using MediatR;
using System.Xml.Linq;

namespace M_Quality.API.Application.CommandHandler.ReinspectionCommandHandler
{
    /// <summary>
    /// 待复检去复检
    /// </summary>
    public class UpdateReinspectionCommandHandler : IRequestHandler<UpdateReinspectionCommand, int>
    {
        private readonly IReinspectionRepository _Reinspectionrepository;
        public UpdateReinspectionCommandHandler(IReinspectionRepository reinspectionrepository)
        {
            _Reinspectionrepository = reinspectionrepository;
        }
        public async Task<int> Handle(UpdateReinspectionCommand request, CancellationToken cancellationToken)
        {
            return await _Reinspectionrepository.UpdateAsync(request);
           
        }
    }
}
